package hoan.nguyen.domain;

// Generated May 24, 2013 9:52:44 PM by Hibernate Tools 4.0.0

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

/**
 * LevelDetail generated by hbm2java
 */
@Entity
@Table(name = "level_detail", catalog = "test_hibernate")
public class LevelDetail implements java.io.Serializable {

	private Integer levelId;
	private Level level;
	private String yoe;
	private String description;

	public LevelDetail() {
	}

	public LevelDetail(Level level, String yoe, String description) {
		this.level = level;
		this.yoe = yoe;
		this.description = description;
	}

	@GenericGenerator(name = "generator", strategy = "foreign", parameters = @Parameter(name = "property", value = "level"))
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "level_id", unique = true, nullable = false)
	public Integer getLevelId() {
		return this.levelId;
	}

	public void setLevelId(Integer levelId) {
		this.levelId = levelId;
	}

	@OneToOne(fetch = FetchType.LAZY)
	@PrimaryKeyJoinColumn
	public Level getLevel() {
		return this.level;
	}

	public void setLevel(Level level) {
		this.level = level;
	}

	@Column(name = "yoe", length = 45)
	public String getYoe() {
		return this.yoe;
	}

	public void setYoe(String yoe) {
		this.yoe = yoe;
	}

	@Column(name = "description", length = 45)
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

}
